package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.AlertData;
import com.zzyl.entity.AlertRule;
import com.zzyl.vo.AlertRuleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * wangcong
 * 2025/2/16 11:04
 */
@Mapper
public interface AlertRuleMapper {
    void insert(AlertRule alertRule);

    Page<AlertRuleVo> pageQuery(String alertRuleName, String functionName, String productKey);

    AlertRuleVo selectByPrimaryKey(Long id);

    void updateByPrimaryKey(AlertRule alertRule);

    void deleteByPrimaryKey(Long id);

    void updateStatus(Long id, Integer status);

    List<AlertRuleVo> queryAllRules(String productKey, String functionId, String iotId);

    List<Long> selectCompairUserIds(String deviceMaintainerRole);

    List<Long> selectNurseByElderId(String iotId);

    List<Long> selectNursingIdsByIotIdWithBed(String iotId);

    List<Long> selectManagerIds(String managerRole);

    void insertBatchAlertData(ArrayList<AlertData> list);
}
